<div class="card">
    <div class="card-header">

    </div>
    <div class="card-body">
        <x-form title="标题" name="title" require value="{{old('title',$lesson['title'])}}"></x-form>
        <div class="mt-2 mb-2">
            @foreach($tags as $tag)
                <label class="mr-2">
                    <input type="checkbox" name="tags[]" value="{{$tag['id']}}"> {{$tag['title']}}
                </label>
            @endforeach
        </div>

        <x-form theme="textarea" title="视频简介" name="description">{{old('description',$lesson['description'])}}</x-form>

        <x-form theme="image" title="网站标志" name="thumb" action="{{route('common.upload')}}"
                value="{{old('thumb',$lesson['thumb'])}}"></x-form>
        <div class="form-group">
            <label >上架</label>
            <input type="checkbox" name="status" {{old('status',$lesson['status'])?'checked':''}}>是
        </div>
        <x-form title="视频下载地址" name="download_address" require value="{{old('download_address',$lesson['download_address'])}}"></x-form>

    </div>

</div>

<lesson-videos></lesson-videos>
<button  class="btn btn-primary">保存</button>
@push('scripts')
    <script>
        window.videos=@json($lesson->videos)
    </script>
@endpush
